import 'package:json_annotation/json_annotation.dart';

part 'carousel.g.dart';

@JsonSerializable()
class Carousel {
  Carousel(this.title, this.url, this.picUrl);

  String title;
  String url;
  @JsonKey(name: "src")
  String picUrl;

  factory Carousel.fromJson(Map<String, dynamic> json) =>
      _$CarouselFromJson(json);
  Map<String, dynamic> toJson() => _$CarouselToJson(this);
}

@JsonSerializable()
class CarouselList {
  CarouselList(this.data);

  @JsonKey(name: "eveduanyou(MA79)-lunhuan-264163")
  List<Carousel> data;
  factory CarouselList.fromJson(Map<String, dynamic> json) =>
      _$CarouselListFromJson(json);

  Map<String, dynamic> toJson() => _$CarouselListToJson(this);
}

